using System.Data;
using ET;
namespace DAL
{
    public class Proposed_Export_Detail_DAL
    {
        private readonly clsConnect cls = new clsConnect();

        #region Getdata
        public DataTable BindGirdtb_Proposed_Export_Detail(string keywords)
        {
            cls.CreateNewSqlCommand();
            cls.AddParameter("@KeyWords", keywords);
            return cls.GetData("sp_tb_Proposed_Export_Detail_Search");
        }
        public DataTable BindGirdtb_Proposed_Export_Detail_Edit(int id)
        {
            cls.CreateNewSqlCommand();
            cls.AddParameter("@Proposed_Export_Detail_ID", id);
            return cls.GetData("sp_tb_Proposed_Export_Detail_SelectRow");
        }
        public DataTable GetDataProposedQualityStill(int id, int id2)
        {
            cls.CreateNewSqlCommand();
            cls.AddParameter("@Proposed_Export_ID", id);
            cls.AddParameter("@Warehouse_ID", id2);
            return cls.GetData("sp_tb_Proposed_Export_Detail_Get_Still");
        }
        #endregion

        #region Insert
        public bool Inserttb_Proposed_Export_Detail(Proposed_Export_Detail_ET data)
        {
            cls.CreateNewSqlCommand();
            cls.AddParameter("@Proposed_Export_ID", data.Proposed_Export_ID);
            cls.AddParameter("@Sell_ID", data.Sell_ID);
            cls.AddParameter("@Materials_ID", data.Materials_ID);
            cls.AddParameter("@Proposed_Export_Quality", data.Proposed_Export_Quality);
            cls.AddParameter("@Proposed_Export_Quality_Still", data.Proposed_Export_Quality_Still);
            return cls.ExecuteNonQuery("sp_tb_Proposed_Export_Detail_Insert");
        }
        #endregion

        #region Update
        public bool Updatetb_Proposed_Export_Detail(Proposed_Export_Detail_ET data)
        {
            cls.CreateNewSqlCommand();
            cls.AddParameter("@Proposed_Export_Detail_ID", data.Proposed_Export_Detail_ID);
            cls.AddParameter("@Proposed_Export_ID", data.Proposed_Export_ID);
            cls.AddParameter("@Sell_ID", data.Sell_ID);
            cls.AddParameter("@Materials_ID", data.Materials_ID);
            cls.AddParameter("@Proposed_Export_Quality", data.Proposed_Export_Quality);
            cls.AddParameter("@Proposed_Export_Quality_Still", data.Proposed_Export_Quality_Still);
            return cls.ExecuteNonQuery("sp_tb_Proposed_Export_Detail_Update");
        }
        #endregion

        #region Delete
        public bool Deletetb_Proposed_Export_Detail(int id)
        {
            cls.CreateNewSqlCommand();
            cls.AddParameter("@Proposed_Export_Detail_ID", id);
            cls.ExecuteNonQuery("sp_tb_Proposed_Export_Detail_DeleteRow");
            return true;
        }
        public bool Deletetb_Proposed_Export_Detail_DefaultID(int id)
        {
            cls.CreateNewSqlCommand();
            cls.AddParameter("@Proposed_Export_ID", id);
            cls.ExecuteNonQuery("sp_tb_Proposed_Export_Detail_Delete_DefaultID");
            return true;
        }
        #endregion
    }
}